//
//  MSAllistFoodCell.m
//  MSJD
//
//  Created by 箭军刘 on 2018/10/15.
//  Copyright © 2018年 xiangbo. All rights reserved.
//

#import "MSAllListFoodCell.h"

#import "MSTypeADetailView.h"

@interface MSAllListFoodCell()

@property (nonatomic, strong) MSTypeADetailView *showView;

@end

@implementation MSAllListFoodCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.showView = [[MSTypeADetailView alloc] init];

        self.showView.layer.shadowRadius = 3;
        self.showView.layer.shadowOffset = CGSizeZero;
        //透明度
        self.showView.layer.shadowOpacity = 0.5;
        //阴影颜色
        self.showView.layer.shadowColor =  [UIColor colorWithRed:0 green:0 blue:0 alpha:0.15].CGColor;
        //阴影半径
        UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(-6,-6, CGRectGetWidth(self.contentView.frame), CGRectGetHeight(self.contentView.frame)) cornerRadius:4];
        //阴影路径
        self.showView.layer.shadowPath = path.CGPath;
        self.showView.layer.masksToBounds = NO;
        
        [self.contentView addSubview:self.showView];
        
        [self.showView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.offset(6);
            make.right.bottom.offset(-6);
        }];
    }
    return self;
}

@end
